<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QPlainTextDocumentLayout Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QPlainTextDocumentLayout Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QPlainTextDocumentLayout class implements a plain text
layout for <a href="qtextdocument.html">QTextDocument</a> <a href="#details">More...</a></p>

<p>Inherits <a href="qabstracttextdocumentlayout.html">QAbstractTextDocumentLayout</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qplaintextdocumentlayout.html#QPlainTextDocumentLayout">__init__</a></b> (<i>self</i>, QTextDocument&#160;<i>document</i>)</li><li><div class="fn" />QRectF <b><a href="qplaintextdocumentlayout.html#blockBoundingRect">blockBoundingRect</a></b> (<i>self</i>, QTextBlock&#160;<i>block</i>)</li><li><div class="fn" />int <b><a href="qplaintextdocumentlayout.html#cursorWidth">cursorWidth</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qplaintextdocumentlayout.html#documentChanged">documentChanged</a></b> (<i>self</i>, int&#160;<i>from</i>, int, int&#160;<i>charsAdded</i>)</li><li><div class="fn" />QSizeF <b><a href="qplaintextdocumentlayout.html#documentSize">documentSize</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qplaintextdocumentlayout.html#draw">draw</a></b> (<i>self</i>, QPainter, QAbstractTextDocumentLayout.PaintContext)</li><li><div class="fn" /><b><a href="qplaintextdocumentlayout.html#ensureBlockLayout">ensureBlockLayout</a></b> (<i>self</i>, QTextBlock&#160;<i>block</i>)</li><li><div class="fn" />QRectF <b><a href="qplaintextdocumentlayout.html#frameBoundingRect">frameBoundingRect</a></b> (<i>self</i>, QTextFrame)</li><li><div class="fn" />int <b><a href="qplaintextdocumentlayout.html#hitTest">hitTest</a></b> (<i>self</i>, QPointF, Qt.HitTestAccuracy)</li><li><div class="fn" />int <b><a href="qplaintextdocumentlayout.html#pageCount">pageCount</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qplaintextdocumentlayout.html#requestUpdate">requestUpdate</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qplaintextdocumentlayout.html#setCursorWidth">setCursorWidth</a></b> (<i>self</i>, int&#160;<i>width</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QPlainTextDocumentLayout class implements a plain text
layout for <a href="qtextdocument.html">QTextDocument</a></p>
<p>A QPlainTextDocumentLayout is required for text documents that
can be display or edited in a <a href="qplaintextedit.html">QPlainTextEdit</a>. See <a href="qtextdocument.html#setDocumentLayout">QTextDocument.setDocumentLayout</a>().</p>
<p>QPlainTextDocumentLayout uses the <a href="qabstracttextdocumentlayout.html">QAbstractTextDocumentLayout</a>
API that <a href="qtextdocument.html">QTextDocument</a> requires,
but redefines it partially in order to support plain text better.
For instances, it does not operate on vertical pixels, but on
paragraphs (called blocks) instead. The height of a document is
identical to the number of paragraphs it contains. The layout also
doesn't support tables or nested frames, or any sort of advanced
text layout that goes beyond a list of paragraphs with syntax
highlighting.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QPlainTextDocumentLayout" />QPlainTextDocumentLayout.__init__ (<i>self</i>, <a href="qtextdocument.html">QTextDocument</a>&#160;<i>document</i>)</h3><p>Constructs a plain text document layout for the text
<i>document</i>.</p>


<h3 class="fn"><a name="blockBoundingRect" /><a href="qrectf.html">QRectF</a> QPlainTextDocumentLayout.blockBoundingRect (<i>self</i>, <a href="qtextblock.html">QTextBlock</a>&#160;<i>block</i>)</h3><p>Reimplemented from <a href="qabstracttextdocumentlayout.html#blockBoundingRect">QAbstractTextDocumentLayout.blockBoundingRect</a>().</p>


<h3 class="fn"><a name="cursorWidth" />int QPlainTextDocumentLayout.cursorWidth (<i>self</i>)</h3><h3 class="fn"><a name="documentChanged" />QPlainTextDocumentLayout.documentChanged (<i>self</i>, int&#160;<i>from</i>, int, int&#160;<i>charsAdded</i>)</h3><p>Reimplemented from <a href="qabstracttextdocumentlayout.html#documentChanged">QAbstractTextDocumentLayout.documentChanged</a>().</p>


<h3 class="fn"><a name="documentSize" /><a href="qsizef.html">QSizeF</a> QPlainTextDocumentLayout.documentSize (<i>self</i>)</h3><p>Reimplemented from <a href="qabstracttextdocumentlayout.html#documentSize">QAbstractTextDocumentLayout.documentSize</a>().</p>


<h3 class="fn"><a name="draw" />QPlainTextDocumentLayout.draw (<i>self</i>, <a href="qpainter.html">QPainter</a>, <a href="qabstracttextdocumentlayout-paintcontext.html">QAbstractTextDocumentLayout.PaintContext</a>)</h3><p>Reimplemented from <a href="qabstracttextdocumentlayout.html#draw">QAbstractTextDocumentLayout.draw</a>().</p>


<h3 class="fn"><a name="ensureBlockLayout" />QPlainTextDocumentLayout.ensureBlockLayout (<i>self</i>, <a href="qtextblock.html">QTextBlock</a>&#160;<i>block</i>)</h3><p>Ensures that <i>block</i> has a valid layout</p>


<h3 class="fn"><a name="frameBoundingRect" /><a href="qrectf.html">QRectF</a> QPlainTextDocumentLayout.frameBoundingRect (<i>self</i>, <a href="qtextframe.html">QTextFrame</a>)</h3><p>Reimplemented from <a href="qabstracttextdocumentlayout.html#frameBoundingRect">QAbstractTextDocumentLayout.frameBoundingRect</a>().</p>


<h3 class="fn"><a name="hitTest" />int QPlainTextDocumentLayout.hitTest (<i>self</i>, <a href="qpointf.html">QPointF</a>, <a href="qt.html#HitTestAccuracy-enum">Qt.HitTestAccuracy</a>)</h3><p>Reimplemented from <a href="qabstracttextdocumentlayout.html#hitTest">QAbstractTextDocumentLayout.hitTest</a>().</p>


<h3 class="fn"><a name="pageCount" />int QPlainTextDocumentLayout.pageCount (<i>self</i>)</h3><p>Reimplemented from <a href="qabstracttextdocumentlayout.html#pageCount">QAbstractTextDocumentLayout.pageCount</a>().</p>


<h3 class="fn"><a name="requestUpdate" />QPlainTextDocumentLayout.requestUpdate (<i>self</i>)</h3><p>Requests a complete update on all views.</p>
<h3 class="fn"><a name="setCursorWidth" />QPlainTextDocumentLayout.setCursorWidth (<i>self</i>, int&#160;<i>width</i>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;snapshot-4.9.5-9eb6aac99275 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.3</td></tr></table></div></address></body></html>